home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global gMouseDownScript
- if gMouseDownScript = 1 then
- hExitDemo()
- end if
- end
-
- on hExitDemo
- cursor(4)
- hDecreaseSound([1, 2], 0, 255)
- set tMoviePath to hGetMoviePath()
- go(1, tMoviePath)
- end
-
- on hDecreaseSound pSoundChannel, pMinVolume, pMaxVolume
- repeat with i = pMaxVolume down to pMinVolume
- repeat with tSoundChannel in pSoundChannel
- set the volume of sound tSoundChannel to i
- updateStage()
- end repeat
- end repeat
- repeat with tSoundChannel in pSoundChannel
- puppetSound(tSoundChannel, 0)
- updateStage()
- set the volume of sound tSoundChannel to pMaxVolume
- end repeat
- end
-
- on hGetMoviePath
- global gMouseDownScript, gDemoType
- if gMouseDownScript = 1 then
- set tMoviePath to hMoviePathToMenu()
- else
- case gDemoType of
- "full":
- set tMoviePath to hMoviePathToNextDemo()
- "group":
- set tMoviePath to hMoviePathToNextDemo()
- "single":
- set tMoviePath to hMoviePathToMenu()
- end case
- end if
- return tMoviePath
- end
-
- on hMoviePathToNextDemo
- global gSectionTrackList, glDemos, gDemoType
- set tCurrentSection to getLast(gSectionTrackList)
- set tCurrentMovieCode to hGetCurrentMovieCode()
- set tList to getProp(glDemos, value("#" & tCurrentSection))
- set tPos to getOne(tList, tCurrentMovieCode)
- set tLastPos to count(tList)
- if tPos = tLastPos then
- case gDemoType of
- "full":
- set tPos to findPos(glDemos, value("#" & tCurrentSection))
- set tLastPos to count(glDemos)
- if tPos = tLastPos then
- set tNextSection to string(getPropAt(glDemos, 1))
- else
- set tNextSection to string(getPropAt(glDemos, tPos + 1))
- end if
- hDeleteFromSectionTrackList()
- hAddToSectionTrackList(tNextSection)
- set tMovieName to getAt(getProp(glDemos, value("#" & tNextSection)), 1)
- if the machineType = 256 then
- set the itemDelimiter to "\"
- else
- set the itemDelimiter to ":"
- end if
- set tMoviePath to item 1 to the number of items in the pathName - 2 of the pathName
- set the itemDelimiter to ","
- if the machineType = 256 then
- set tMoviePath to tMoviePath & "\" & tNextSection & "-demos" & "\" & tMovieName
- else
- set tMoviePath to tMoviePath & ":" & tNextSection & "-demos" & ":" & tMovieName
- end if
- "group":
- set tMoviePath to hMoviePathToMenu()
- end case
- else
- set tMoviePath to getAt(getProp(glDemos, value("#" & tCurrentSection)), tPos + 1)
- end if
- return tMoviePath
- end
-
- on hMoviePathToMenu
- global gDemoType, gSectionTrackList, gProductNumber
- if the machineType = 256 then
- set the itemDelimiter to "\"
- else
- set the itemDelimiter to ":"
- end if
- set tMoviePath to item 1 to the number of items in the pathName - 2 of the pathName
- set the itemDelimiter to ","
- case gDemoType of
- "full":
- set tMovieName to gProductNumber & "MAIN"
- "group", "single":
- set tMovieName to gProductNumber & getLast(gSectionTrackList)
- end case
- if the machineType = 256 then
- set tMoviePath to tMoviePath & "\" & tMovieName
- else
- set tMoviePath to tMoviePath & ":" & tMovieName
- end if
- return tMoviePath
- end
-
- on hGetCurrentMovieCode
- global gProductNumber
- set tMovieName to the movieName
- set the itemDelimiter to "."
- set tCurrentMovieCode to item 1 of tMovieName
- set the itemDelimiter to ","
- return tCurrentMovieCode
- end
-
- on hAddToSectionTrackList pSection
- global gSectionTrackList
- if voidp(gSectionTrackList) = 1 then
- set gSectionTrackList to []
- end if
- add(gSectionTrackList, pSection)
- end
-
- on hDeleteFromSectionTrackList
- global gSectionTrackList
- deleteAt(gSectionTrackList, count(gSectionTrackList))
- end
-